package com.bawei.demo_shoppingcar.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.bawei.demo_shoppingcar.R;

/**
 * Created by HP on 2017/3/25.
 */

public class MyRecyclerAdapter extends RecyclerView.Adapter<MyRecyclerAdapter.OneMyViewHolder> {

    private final LayoutInflater inflater;

    public MyRecyclerAdapter(Context context){
        inflater = LayoutInflater.from(context);
    }
    @Override
    public OneMyViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
        View inflate = inflater.inflate(R.layout.one_my_item,viewGroup,false);
        return new OneMyViewHolder(inflate);
    }

    @Override
    public void onBindViewHolder(OneMyViewHolder oneMyViewHolder, int i) {

    }

    @Override
    public int getItemCount() {
        return 100;
    }

    class OneMyViewHolder extends RecyclerView.ViewHolder{

        public OneMyViewHolder(View itemView) {
            super(itemView);
        }
    }
}
